<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function doSomething(part, chapter) {
        const parts = ["ES2016", "工程化", "Vue", "React", "Node"];
        if (!part) return console.log("请确认模块信息");
        if (!parts.includes(part)) return;
        console.log("属于当前前端课程");
        if (!(chapter > 5)) return console.log("您需要提供VPI省份");

        /* if (part) {
          if (parts.includes(part)) {
            console.log("属于当前前端课程");
            if (chapter > 5) {
              console.log("您需要提供VPI省份");
            }
          }
        } else {
          console.log("请确认模块信息");
        } */
      }

      doSomething("ES2016", 6);
    </script>
  </body>
</html>
